﻿Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Data
Imports System.Collections
Imports System.Windows.Forms
Imports DataObject
Imports DataObject.hDBase

Public Class BusTaiLieuDinhKem

    Private TaiLieuDinhKemDAO As New SqlServerTaiLieuDinhKem
    Private oTable As New DataTable

    Public Function GetAllTaiLieuDinhKem(ByVal sStringConnection As String) As Object
        Try
            oTable = TaiLieuDinhKemDAO.GetAllTaiLieuDinhKem(sStringConnection)
        Catch ex As Exception
            MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
        Return oTable
    End Function

    Public Sub InsertTaiLieuDinhKem(ByVal sStringConnection As String, ByVal oTaiLieuDinhKem As TaiLieuDinhKem)
        Try
            TaiLieuDinhKemDAO.InsertTaiLieuDinhKem(sStringConnection, oTaiLieuDinhKem)
        Catch ex As Exception
            MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
    End Sub

    Public Sub UpdateTaiLieuDinhKem(ByVal sStringConnection As String, ByVal oTaiLieuDinhKem As TaiLieuDinhKem)
        Dim bool_ As Boolean = True
        Try
            TaiLieuDinhKemDAO.UpdateTaiLieuDinhKem(sStringConnection, oTaiLieuDinhKem)
        Catch ex As Exception
            MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
    End Sub

    Public Sub DeleteTaiLieuDinhKem(ByVal sStringConnection As String, ByVal oTaiLieuDinhKem As TaiLieuDinhKem)
        Try
            TaiLieuDinhKemDAO.DeleteTaiLieuDinhKem(sStringConnection, oTaiLieuDinhKem.SoTaiLieuDinhKem)
        Catch ex As Exception
            MessageBox.Show(ex.ToString, "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
    End Sub

End Class
